package com.fhj.movie.customespinner;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class CustomerSpinnerAdapter extends BaseAdapter {

	private String name;
	private Context context;
	
	public void init(Context context,String name){
		this.name = name;
		this.context = context;
	}
	
	@Override
	public int getCount() {
		// TODO 自动生成的方法存根
		return 1;
	}

	@Override
	public Object getItem(int position) {
		// TODO 自动生成的方法存根
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO 自动生成的方法存根
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO 自动生成的方法存根
		TextView  textView =null;
		if (convertView==null) {
			 textView = new TextView(context);
			convertView = textView;
		}else {
			textView = (TextView) convertView;
		}
		textView.setText(name);
		textView.setTextSize(15);
		textView.setTextColor(Color.BLACK);
		return textView;
	}

}
